home *** CD-ROM | disk | FTP | other *** search
- /* File fixit.h Copyright (C) 1996 by John R. Montbriand. All Rights Reserved. */
-
- #ifndef __FIXIT__
- #define __FIXIT__
-
- /* File fixit.h
-
- Copyright (C) 1996 by John Montbriand. All Rights Reserved.
-
- Distribute freely in areas where the laws of copyright apply.
-
- Use at your own risk.
-
- Do not distribute modified copies.
-
- These various fixmath routines and libraries are for free!
-
- See the file fixit.txt for details.
-
- */
-
- #include <Types.h>
- #include <FixMath.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* some useful constants */
-
- #define fxPI 0x0003243F /* = 3.141592 pi */
- #define fxE 0x0002B7E1 /* = 2.718282 e */
- #define fxGOLDEN 0x00019E37 /* = 1.618034 golden ratio */
- #define fxRPD 0x00000478 /* = 0.017453 radians per degree */
- #define fxDPR 0x00394BB8 /* = 57.29578 degrees per radian */
-
-
- /* FixSqrt calculates the square root of the fixed point
- number x. */
- Fixed FixSqrt(Fixed x);
-
- /* FixExp calculates x to the power a where both x and
- a are fixed point numbers */
- Fixed FixExp(Fixed x, Fixed a);
-
- /* FixSquare calculates the square of the fixed point
- number x. */
- Fixed FixSquare(Fixed x);
-
- /* FixCos calculates the cosine of the fixed point
- number x. x is in radians. */
- Fixed FixCos(Fixed x);
-
- /* FixSin calculates the sine of the fixed point
- number x. x is in radians. */
- Fixed FixSin(Fixed x);
-
- /* FixTan calculates the tangent of the fixed point
- number x. x is in radians. */
- Fixed FixTan(Fixed x);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
- /* end of file fixit.h */
-